-- robot
-- created by wangy
-- 召唤兽：机械人

return {
    fetchInitData = function(classId)
        -- 获取重装卡车史莱姆的专属技能等级
        local prop = PropM.combine(ME.user, "gain_slime_skill", 20);
        local level = PropM.apply(prop, 0);

        local userHp = ME.user:queryAttrib("max_hp");
        local userAttack = ME.user:queryAttrib("attack");
        local hp;
        local attack;

        if classId == 34 then
            -- 铁皮属性
            attack = math.modf(userAttack * (500 + level * 100) / 1000);
            hp = math.modf(userHp * (700 + level * 100) / 1000);
        elseif classId == 35 then
            -- 大黄蜂属性
            local baseAttack = InterfaceM.calcBaseAttrib(ME.user, "attack");
            attack = math.modf(baseAttack * (500 + level * 100) / 1000);
            hp = math.modf(userHp * (250 + level * 100) / 1000);
        end

        -- 保底
        hp = math.max(hp, 1);
        attack = math.max(attack, 1);
        return {
            ["hp"] = hp,
            ["max_hp"] = hp,
            ["attack"] = attack,
        };
    end,
};
